<script>
$(document).ready(function(){  

     		
		$("#id_uni_acad").change(function(){
            if($(this).val()!=""){
                var dato1=$(this).val();
			
				$("#imgtema1").show();
                $.ajax({
                    type:"POST",
                    dataType:"html",
                    url: "<?php echo base_url(); ?>site/carga_docente",
                    data:"codejs="+dato1,
                    success:function(msg){
                        $("#id_docente").empty().removeAttr("disabled").append(msg);
                        $("#imgtema1").hide();
                    }
                });
            }else{
                $("#id_docente").empty().attr("disabled","disabled");
            }  
        });
		

    
	
	});
	
</script>
	
	<?php
		$attributes = array('class' => 'rmis10', 'id' => 'rmis10', 'target' => 'foo', 'onSubmit' => 'window.open("", "foo", "width=450,height=300,status=yes,resizable=yes,scrollbars=yes")');
		//$js = 'onSubmit="window.open("", "foo", "width=450,height=300,status=yes,resizable=yes,scrollbars=yes")"';
		echo form_open('site/grafico', $attributes);
	?>
	
   
	<p>
    Escuela/Departamento:<br>
    <select name="id_uni_acad" id="id_uni_acad">
    <option value="-1">SELECCIONAR</option>
<?php
    foreach($report_eval_alumn as $i => $dato)
    {
        echo '<option value="'.$dato['codigo_unidad'].'">';
        echo $dato['nombre_unidad'];
        echo '</option>';
    }
?>
	</select>
    <img src="<?php echo base_url(); ?>source/image/spinner5.gif" style="display:none;" alt="Cargando" id="imgtema"/>
    </p>
	
	<p>
    Docente:<br>
    <select name="id_docente" id="id_docente" disabled="disabled">
    </select>
    <img src="<?php echo base_url(); ?>source/image/spinner5.gif" style="display:none;" alt="Cargando" id="imgtema1"/>
    </p>

	
	<br><br>
	<?php 
	
	echo form_submit('mysubmit', 'Generar Reporte!'); ?>